Xbasic

*PLAIN_TO_RTF Function

Syntax

RTF_Text as C = *PLAIN_TO_RTF(C text)

Arguments

RTF_Text

ASCII encoded RTF text with default font, style, and size attributes.

text

Plain un-encoded ASCII text.

Description

Convert from plain text to rtf.

Discussion

The *PLAIN_TO_RTF() function converts plain ASCII text into encoded RTF text.

Example

dim rtf_text as C
dim plain_text as C
plain_text = "George lived on top of a mountain."
rtf_text = *plain_to_rtf(plain_text)
? r
= "{\rtf1\ansi \deff0{\colortbl;\red0\green0\blue0;}{\fonttbl{\f0\fnil Tahoma;}}{{\f0 \cf1 \fs16 George lived on top of a mountain.}}}"

See Also